package com.hsytech.dijiebao.person.fragment;

import java.util.HashMap;
import java.util.List;

import com.hsytech.dijiebao.R;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

public class CollectHotleAdapter extends BaseAdapter {
	private Context context;
	private List<HashMap<String, String>> listdata;
	private LayoutInflater inflater;
	private View myitemview;

	public CollectHotleAdapter(Context collectHotelFrament, List<HashMap<String, String>> listdata) {
		this.context = collectHotelFrament;
		inflater = LayoutInflater.from(collectHotelFrament);
		this.listdata = listdata;
	}

	@Override
	public int getCount() {
		return listdata.size();
	}

	@Override
	public Object getItem(int position) {
		return listdata.get(position);
	}

	@Override
	public long getItemId(int position) {
		return position;
	}

	@Override
	public View getView(final int position, View itemView, ViewGroup parent) {

		itemView = inflater.inflate(R.layout.detail_more_my_hotle, null);
		TextView city = (TextView) itemView.findViewById(R.id.city);
		TextView detail_content = (TextView) itemView.findViewById(R.id.detail_content);
		// ImageView Logo = (ImageView)
		// itemView.findViewById(R.id.item_worker_banklist_image);

		HashMap<String, String> map = listdata.get(position);
		city.setText(map.get("city"));
		detail_content.setText(map.get("content"));

		// isDefault.setTextColor(context.getResources().getColor(Integer.valueOf(map.getB())));
		// holder.t4.setTextColor(context.getResources().getColor(Integer.valueOf(map.get("t5").toString())));

		return itemView;
	}

}
